/*
*********************************************************************************************************
*********************************************************************************************************
* File : Main_constant.h
* By : Minglie
* Date :
*********************************************************************************************************
*/


#ifndef __Main_Constant_H
#define __Main_Constant_H




#ifdef OS_GLOBALS
#define OS_EXT
#else
#define OS_EXT extern
#endif

typedef union
{
	struct
	{
		unsigned low : 4;
		unsigned up : 4;

	}half;
	struct
	{
		unsigned b0 : 1;
		unsigned b1 : 1;
		unsigned b2 : 1;
		unsigned b3 : 1;
		unsigned b4 : 1;
		unsigned b5 : 1;
		unsigned b6 : 1;
		unsigned b7 : 1;
	}one;
	unsigned char all;
}CHAR_TypeDef;





typedef union
{
	struct
	{
		unsigned low_vol_num_b210 : 3; 
		unsigned up_vol_num_b543 : 3; 
		unsigned charge_b6 : 1; 
		unsigned bat_low_up_b7 : 1;
	}one;
	unsigned char all;
} ptl_rx_stack_TypeDef;



OS_EXT volatile union bits_decompound 
{
	struct struct0
	{
		unsigned ms1_s : 1; 
		unsigned ms5_s : 1; 
		unsigned key_d_s : 1;  //按键按下标志
		unsigned key_u_s : 1;  //按键松开标志
	}one;
	unsigned char all[2];
}bt;



typedef struct
{
   float    i0;
	 int      i1;
	 int      o0;
	 int      o1;
} NodeServerIoTypeDef;




OS_EXT unsigned char key_num;
OS_EXT unsigned char key_temp; 
OS_EXT CHAR_TypeDef key;
OS_EXT unsigned char key_d_delay; 
OS_EXT unsigned char key_u_delay; 





#endif

